import {onMounted, onUnmounted, ref} from 'vue'
import {useEventListener} from "./event";

export function useMouse() {
    const x = ref(0)
    const y = ref(0)

    useEventListener(window, 'mousemove', e => {
        x.value = e.pageX
        y.value = e.pageY
    })

    return {x, y}
}